# -*- coding: utf-8 -*-
# @Time : 2022/4/9 19:53
# @Author : Liuqing
# @File : 06_分块.py
# @Software : PyCharm
from math import ceil


def chunk(lst, size):
    return list(
                map(
                    lambda x: lst[x * size: x * size + size],
                    list(
                        range(0, ceil(len(lst) / size))
                    )
                )
            )


if __name__ == '__main__':
    print(chunk([1, 2, 3, 4, 5], 2))
